import { BasicGetIdModel, BasicPageParams } from '@/api/model/baseModel'
export interface AccountListModel {
  accountCode: string //账号id
  accountName: string //账号名称
  authStatus: 0 | 1 //授权状态，0未授权，1已授权
  systemStatus: string //系统状态
  accountBalance: number //余额
  systemIndustryName: string //广告主行业名称
  operatorName: string //运营人员
  mainOperator: string //主要运营人员
  createTime: string //创建时间
  redirectUri: string //授权地址
  accountRemark: string //账号备注
  disabled: boolean //是否禁用
  collectStatus: 0 | 1 //收藏状态，0未收藏，1已收藏
  operators: string //运营人员
  storeId: number //店铺id
}
export interface AccountListParams extends BasicPageParams {
  startTime: string
  endTime: string
  accountCode: string
  accountName: string
  authStatus: 0 | 1
  systemIndustryId: string
}
export interface LeapAccountListParams extends BasicPageParams {
  startTime: string
  endTime: string
  accountCode: string
  accountName: string
  collectStatus: 0 | 1
  systemIndustryId: string
}
export interface AccountAddParams {
  accountCodeList?: string[]
}
export interface AccountIndustryListModel {
  systemIndustryId: string //行业Id
  systemIndustryName: string //广告主行业名称
}
export interface MonitorListParams extends BasicPageParams {
  startTime: string
  endTime: string
  productInfo: string
  pageInfo: string
  accountInfo: string
  status: 0 | 1
}
export interface MonitorListModel {
  id: string //主键id
  adgroupId: string
  accountCode: string //账号id
  accountName: string //账号名称
  status: 0 | 1 //盯盘状态，0未授权，1已授权
  productName: string //商品名称
  pageImgUrl: string //页面主图
  pageId: string //页面ID
  pageName: string //页面名称
  maxCost: string //临界成本
  accountBalance: string //账号余额
  tolCost: string //花费
  orderCount: number //下单量
  orderCost: string //下单成本
  orderAmount: string //订单金额
  roi: string //roi
  closeAdCount: number //已关闭广告数
  systemStatus: string
  engineModeStr: string
  engineMode: 0 | 1
  batchMessage: string[]
}

export interface AddWatcherParams {
  productId: string
  productName: string
  pageId: string
  pageName: string
  accountCode: string
  accountName: string
  maxCost: number
}

export interface WatcherAccountListParams {
  accountInfo: string
}
export interface WatcherAccountListModel {
  accountName: string
  accountCode: string
  authStatus: 0 | 1
}
export interface updateWatcherParams {
  id: string
  status: string
  maxCost: string
}
export interface updateModeParams {
  id: string
  engineMode: 0 | 1
}
export interface MonitorLogsListParams {
  startTime: string
  endTime: string
  adgroupId: string //广告ID
  accountCode?: string //媒体账户
  pageId?: string //页面Id
}
export interface MonitorLogsListModel {
  createdTime: string //盯盘时间
  adgroupId: string //广告ID
  operateType: string //盯盘日志
  maxCost: string //临界成本
  tolCost: string //操作时刻花费
  orderCount: number //操作时刻下单量
  orderCost: string //操作时刻下单成本
  finalTolCost: string //最终花费
  finalOrderCost: string //最终下单成本
  finalOrderCount: number //最终下单量
  costRate: number //成本上升率
}

export interface CriticalCostCalculateParams {
  packagePrice: number
  productCost: number
  flowAmount: number
  flowRate: number
  receiveRate: number
  profitRate: number
}
export interface ManageListParams {
  accountCode: number
  keyword?: string
}
export interface ManageListModel {
  mcFlag: number
  id: number
  accountCode: number
  adgroupId: number
  targetingId: number
  targetingName: string
  releaseBeginDate: string
  releaseTimeType: 1 | 2
  releaseBeginTime: string
  releaseEndTime: string
  bidAmount: number | null
  addTime: string
  name: string
  goalRoi: number | null
  campaignSelect: number
  mediaList: [
    {
      id: number
      previewUrl: string
      width: number
      height: number
      type: 1 | 2
    }
  ]
}

export type ManageReviewUpdateParams = BasicGetIdModel
export interface ManageReviewCopyParams {
  id: string | number
  copyNum: number
}
export interface ManageReviewUpdateModel {
  pre_review_details: string
  reject_reason_detail: string
  element_type: string
  risk_level: string
}
export interface ManageRecordListParams extends BasicPageParams {
  startTime: string
  endTime: string
  accountCode: string
  customerName: string
}
export interface ManageRecordListModel {
  id: number
  accountCode: string
  customerName: string
  successNum: string
  failNum: string
  totalNum: number
  submitTime: string
}
export interface ManageRecordDetailParams extends BasicPageParams {
  accountCode: string
  status: 0 | 1
}
export interface ManageRecordDetailModel {
  name: string
  status: 1 | 2 | -1
  id: number
  loading: boolean
}
export type ManageErrorInfoParams = BasicGetIdModel
export interface ManageErrorInfoModel {
  gdtCode: string
  msg: string
}
export interface ManageHandUploadParams {
  accountCode: number
  adIds: string[]
}
export interface ManageHandUploadModel {
  accountCode: number
  adIds: string[]
}
// export interface AdSiteSetParams {
//   accountCode: number
// }
export interface AdSiteSetModel {
  id: number
  code: string
  name: string
  desc: string
  multiSelect: 0 | 1
  defaultSelect: 0 | 1
}
export interface AdsCampaignParams extends BasicPageParams {
  accountCode: string
  campaignName: string | number
}
export interface AdsCampaignModel {
  campaignId: string | number
  campaignName: string | number
  configuredStatus: string
  campaignType: string
  promotedObjectType: string
  dailyBudget: number
  totalBudget: number
  createdTime: string | number
  lastModifiedTime: string | number | null
  speedMode: string
  isDeleted: number
}
export interface AdsProductCatalogsParams extends BasicPageParams {
  accountCode: string
}
export interface AdsProductCatalogsModel {
  productCatalogId: number
  productCatalogName: string
  productCatalogType: string
  productCatalogVertical: string
  productCatalogStatus: string
}
export interface AdsProductItemsParams extends BasicPageParams {
  accountCode: string
  productCatalogId: number
  keyword: string
}
export interface AdsProductItemsModel {
  productOuterId: string
  productName: string
  productImageUrl: string
}

export interface AdsMiniPageParams extends BasicPageParams {
  accountCode: string
  pageId: string
  pageName: string
}
export interface AdsMiniPageModel {
  pageId: string
  pageName: string
  productId: string
  createdAt: string
}
export interface AdsTargetingParams extends BasicPageParams {
  accountCode: string
}
export interface AdsTargetingModel {
  pageId: string
  pageName: string
  productId: string
  createdAt: string
  immersiveVideoUrl: string
}
export interface AdsAudienceParams extends BasicPageParams {
  accountCode: string
  type: 0 | 1
}
export interface AdsAudienceModel {
  audienceId: string | number
  accountId: string
  audienceName: string
  audienceDescription: string
  cooperated: string
  audienceType: string
  source: string
  status: string
  audienceStatus: string
  errorCode: string
  userCount: string
  createdTime: string
  lastModifiedTime: string
  audienceSpec: string
}
export interface AdsTemplateListParams {
  accountCode: string
  siteSets: string[]
  siteSetType: 0 | 1
  dynamic: 0 | 1
}
export type AdsTemplateDetailParams = AdsTemplateListParams
export interface AdsWechatChannelParams extends BasicPageParams {
  accountCode: string
}
export interface AdsWechatChannelModel {
  headImgUrl: string
  description: string
  value: string
}
export interface AdsImageListParams extends BasicPageParams {
  accountCode: string
  mediaId: string
  width: string
  height: string
}
export type AdsVideoListParams = AdsImageListParams
export interface AdsTextParams {
  accountCode: string
  length: string | number
  keyword: string
  number: string | number
}
export interface AdsCopyParams {
  id: number
  copyNum: number
}
export interface PlanListParams extends BasicPageParams {
  startTime: string
  endTime: string
}
export interface PlanListModel {
  openTime: any
  batchGroup: string //批次号
  accountCode: string //账号id
  goodsName: string //商品名称
  productName: string //商品名称
  pageImgUrl: string //页面主图
  pageId: string //页面ID
  totalCost: number //花费
  orderCost: number //广告成本
  orderCnt: number //广告下单量
  orderAmount: number //广告订单金额
  flowOrderCnt: number //回流下单量
  flowOrderAmount: number //回流订单金额
  roi: string //广告ROI
  totalRoi: string //总计ROI
  configStatus: 0 | 1 | 3
  activeStatus: 0 | 1
  linkStatus: number
}
export interface accountListParams extends BasicPageParams {
  accountCode: string
  accountName: string
  systemIndustryId: string
  startTime: string
  endTime: string
}
export interface adgroupListParams extends BasicPageParams {
  adgroupId: string
  adgroupName: string
  startTime: string
  endTime: string
}
export interface adgroupUpdateParams {
  accountCode?: string
  adgroupIdList?: string[]
  adgroupName?: string
  configuredStatus?: string
  costPrice?: string
  beginDate?: string
  startTime?: string
  targetingId?: string
  dailyBudget?: number
  bidStrategy?: string
  autoAcquisitionEnabled?: boolean
  autoAcquisitionBudget?: number
  expectedRoi?: number
}
export interface campaignListParams {
  accountCode?: string
  startTime?: string
  endTime?: string
  campaignId?: string
  campaignName?: string
  dataFilter?: string
  configuredStatus?: string
  isDeleted?: 0 | 1
}
export interface gdtAccountReportParams extends BasicPageParams {
  accountCode?: string
  startTime?: string
  endTime?: string
  campaignId?: string
  adgroupId?: string
  adId?: string
  systemIndustryId?: string
  columnValues?: string[]
}
export interface gdtMediaListParams extends BasicPageParams {
  accountCode?: string
  startTime?: string
  endTime?: string
  adgroupId?: string
  adgroupName?: string
}
export interface targetingsAddParams {
  accountCode: string
  targetName: string
  minAge: string
  maxAge: string
  gender: string
  excludedDimension: string
  customAudience: string[]
  excludedCustomAudience: string[]
}
